<template>
    <el-container>
        <el-main>
            <el-table :data="tableData" stripe element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" v-loading.fullscreen.lock="loading">
                <el-table-column prop="id" label="搜索编号" width="80" />
                <el-table-column prop="userMu" label="用户MU" width="180" />
                <el-table-column prop="userNick" label="用户昵称" width="80" />
                <el-table-column prop="userHead" label="头像" width="112">
                    <template #="{ userHead }">
                        <Avatar :src="userHead" />
                    </template>
                </el-table-column>
                <el-table-column prop="city" label="城市" width="120" />
                <el-table-column prop="keyword" width="120" label="搜索关键词" />
                <el-table-column label="搜索页面" width="200">
                    <template #="{ searchType }">
                        <div v-if="searchType == 0">
                            医生查询-首页
                        </div>
                        <div v-if="searchType == 1">
                            医生查询-资质页
                        </div>
                        <div v-if="searchType == 2">
                            医生查询-案例页
                        </div>
                    </template>
                </el-table-column>
                <el-table-column prop="createTime" label="搜索时间" width="160" />
            </el-table>
            <SearchPagination :currentPage="currentPage" :total="total" :limit="limit" @handleCurrentChange="handleCurrentChange" @handleSizeChange="handleSizeChange" />
        </el-main>
    </el-container>
</template>

<script>
import { page } from '@/chaos/functions/mixin/crud';

export default {
    name: 'searchhistory',
    mixins: [page],
    data() {
        return {
            domain: 'iya_search'
        };
    },
    created() {
        this.data.userMu = this.$route.params.mu;
        this.search();
    }
};
</script>
<style scoped></style>
